CREATE TABLE [Daycare].[EmployeeNotes](
	[EmployeeNoteId] [int] IDENTITY(1,1) NOT NULL,
	[TimeStamp] [datetime2](7) NOT NULL,
	[EmployeeId] [int] NOT NULL,
	[NotedById] [int] NOT NULL,
	[NoteText] [varchar](1000) NOT NULL,
PRIMARY KEY CLUSTERED 
(
	[EmployeeNoteId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]

ALTER TABLE [Daycare].EmployeeNotes ADD  CONSTRAINT [DF_EmployeeNotes_TimeStamp]  DEFAULT (getdate()) FOR [TimeStamp]
GO

ALTER TABLE [Daycare].EmployeeNotes  WITH CHECK ADD  CONSTRAINT [FK_EmployeeNotes_Employees_NotedBy] FOREIGN KEY([NotedById])
REFERENCES [Daycare].[Employees] ([EmployeeId])
GO

ALTER TABLE [Daycare].EmployeeNotes  WITH CHECK ADD  CONSTRAINT [FK_EmployeeNotes_Employees_Staff] FOREIGN KEY([EmployeeId])
REFERENCES [Daycare].[Employees] ([EmployeeId])
GO